/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package javatest;

import java.io.File;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemManager;
import org.apache.commons.vfs2.VFS;

/**
 *
 * @author Rdelacruz
 */
public class JavaTest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String sql = "select\n" +
"VM.Conglome, VM.Vivienda, VM.NroVivienda, H.Hogar\n" +
"from Campo_Vivienda_Marco VM\n" +
"left join Campo_Vivienda V\n" +
"	on VM.Conglome=V.Conglome and VM.Vivienda=V.Vivienda\n" +
"left join Campo_Hogar H\n" +
"	on VM.Conglome=H.Conglome and VM.Vivienda=H.Vivienda";
        
        //String path = "\\\\myip\\storage\\ogg\\VX-276.ogg";
        String path = "\\\\192.168.10.150\\InfoEnahoXML\\2014\\6738-023.Xml";
        File f = new File(path);
        if(f.exists()) {
            System.out.println("SI");
        }
        else {
            System.out.println("NO");
        }
        
        FileSystemManager fsManager = null;
        
        try {
            fsManager = VFS.getManager();

            FileObject basePath;
            basePath = fsManager.resolveFile("file:" + path);

            if (basePath.exists())
                System.out.println("exists");
            else {
                System.out.println("missing" + basePath.getURL());
            }
        } catch (FileSystemException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
                
    }
    
}
